package com.linq.cool.beauty.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.linq.cool.beauty.domain.BeautyOrder;
import com.linq.cool.beauty.dto.BeautyOrderQueryDTO;
import com.linq.cool.beauty.vo.statistical.StatisticalVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: yqlin
 * @Date: 2021/2/11 00:34
 * @Description:
 * @Version: 1.0.0
 */

public interface BeautyOrderMapper extends BaseMapper<BeautyOrder> {
    /**
     * 分页获取客户的所有订单信息
     *
     * @param page
     * @param memberId 客户id
     * @param dto      信息
     *
     * @return
     */
    IPage<BeautyOrder> listMemberOrdersByPage(IPage<BeautyOrder> page, @Param("dto") BeautyOrderQueryDTO dto, @Param("memberId") Long memberId);

    /**
     * 月订单统计
     *
     * @return
     */
    List<StatisticalVO> statisticMonthOrder();

    /**
     * 客户月统计订单
     *
     * @return
     */
    List<StatisticalVO> statisticMemberMonthOrder(Long memberId);

}